1 KEY OFF:CLEAR ,,,1024*32:VER=1.1:WIN$="KING RUFUS":VIEW PRINT 1 TO 25:DIM N(60):DIM N$(60)
2 REM GRAY HOUND RACER - TANDY 1000
3 REM COPYRIGHT 1989 BROOKS DEFOREST
4 SOUND ON: RANDOMIZE TIMER+RND*999
5 SCREEN 2:SCREEN 5:PALETTE 0,0:PALETTE 1,0:PALETTE 2,0:PALETTE 3,0:CLS
6 IN=8:CASH=1000:BANK=500:LOAN=0
10 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
15 COLOR 3:LOCATE 3,14:PRINT "GRAYHOUND RACER"
20 COLOR 2
25 LOCATE 10,13:PRINT "(C)1988 B.DEFOREST"
30 LOCATE 12,12:PRINT "ORIGINAL PROGRAM ON"
35 LOCATE 14,14:PRINT "AMSTRAD CPC 1987":COLOR 3
36 LOCATE 18,8:PRINT "1989 Tandy 16 Color Update"
50 PALETTE 3,8:PALETTE 1,0:PALETTE 2,0:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,4:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,12:PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,9:FOR P=1 TO 100:NEXT
55 FOR P=1 TO 1500:NEXT
60 PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,0:PALETTE 2,4:PALETTE 3,7:FOR P=1 TO 100:NEXT:PALETTE 2,0:PALETTE 3,8:FOR P=1 TO 100:NEXT:PALETTE 3,0:CLS
65 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
70 COLOR 3:LOCATE 2,14:PRINT "GRAYHOUND RACER"
75 COLOR 2:LOCATE 5,10:PRINT "SELECT OPTION:"
80 COLOR 3:LOCATE 8,15:PRINT "[1] - NEW GAME":LOCATE 10,15:PRINT "[2] - CONTINUE":LOCATE 12,15:PRINT "[3] - BANK":LOCATE 14,15:PRINT "[4] - QUIT PROGRAM"
85 PALETTE 3,8:PALETTE 1,0:PALETTE 2,0:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,4:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,12:PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,9:FOR P=1 TO 100:NEXT
89 PLAY "MB"
90 A$=INKEY$:IF A$="" THEN SOUND RND*300,.5,5,0:SOUND RND*300,.5,5,1:SOUND RND*300,.5,5,2:GOTO 90
95 IF A$="1" THEN RUN
100 IF A$="2" AND ZG=0 THEN GOSUB 845:GOTO 500
101 IF A$="2" AND ZG=1 THEN ZG=0:GOSUB 845:GOTO 680
105 IF A$="3" THEN GOSUB 845:GOTO 120
110 IF A$="4" OR A$=CHR$(27) THEN SCREEN 2:SCREEN 0:CLEAR ,,,1024*16:CHDIR "..":RUN "menu"
115 GOTO 90
120 PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,0:PALETTE 2,4:PALETTE 3,7:FOR P=1 TO 100:NEXT:PALETTE 2,0:PALETTE 3,8:FOR P=1 TO 100:NEXT:PALETTE 3,0:CLS
121 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
122 COLOR 2:LOCATE 20,5:PRINT "CASH IN ACCOUNT $"BANK:LOCATE 22,5:PRINT "MONEY ON LOAN $"LOAN:LOCATE 18,15:COLOR 3:PRINT "INTEREST"IN"%"
125 COLOR 1:LOCATE 2,18:PRINT "[BANK]":COLOR 2:LOCATE 5,5:PRINT "OPTIONS:"
130 COLOR 3:LOCATE 8,10:PRINT "[1] - DEPOSIT CASH"
131 LOCATE 10,10:PRINT "[2] - WITHDRAW CASH"
132 LOCATE 12,10:PRINT "[3] - ASK FOR LOAN"
133 LOCATE 14,10:PRINT "[4] - MAIN MENU"
134 PALETTE 3,8:PALETTE 1,0:PALETTE 2,0:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,2:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,10:PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,9:FOR P=1 TO 100:NEXT
135 A$=INKEY$:IF A$="" THEN SOUND RND*3000,.5,5,0:SOUND RND*3000,.5,5,1:SOUND RND*3000,.5,5,2:GOTO 135
136 IF A$="4" THEN 60
137 IF A$="1" THEN CLS:COLOR 3:PRINT "DEPOSIT CASH:":COLOR 2:PRINT:PRINT "YOU HAVE $"CASH"IN POCKET, AND $"BANK"IN THE BANK.":PRINT:COLOR 3:PRINT "DEPOSIT $";:GOTO 140
138 IF A$="2" THEN 144
139 IF A$="3" THEN 150
140 COLOR 2:LINE INPUT "",O$
141 IF O$="" THEN 120 ELSE O=VAL(O$):IF O>CASH THEN NOISE 0,15,3:GOTO 120
142 CASH=CASH-O:BANK=BANK+O:IF O=LOAN THEN LOAN=0:BANK=BANK-O:RTG=0:O=0 ELSE O=0
143 PLAY "A40C40A40":GOTO 120
144 CLS:COLOR 3:PRINT "WITHDRAW CASH:":COLOR 2:PRINT:PRINT "YOU HAVE $"CASH"IN POCKET":PRINT "YOU HAVE $"BANK" IN THE BANK":PRINT:COLOR 3:PRINT "WITHDRAW $";:COLOR 2:LINE INPUT "",O$
145 IF O$="" THEN 120 ELSE O=VAL(O$):IF O>BANK THEN NOISE 0,15,3:GOTO 120
146 BANK=BANK-O:CASH=CASH+O:O=0
147 PLAY "A40C40A40":GOTO 120
150 CLS:COLOR 1:PRINT "LOAN:":PRINT:PRINT:COLOR 3:PRINT "CURRENT INTEREST RATE AT"IN"%.":PRINT:PRINT "CURRENT DEPTS OF $"LOAN:PRINT:PRINT "TOTAL CASH $"CASH+BANK
151 PRINT "SECURE CASH $"(CASH+BANK)-LOAN:HIGH=2*((CASH+BANK)-LOAN):HIGH=HIGH-(HIGH/IN)
152 PRINT "HIGHEST LOAN VALUE $"HIGH
153 PRINT "HIGHEST POSSIBLE AMOUNT $"CASH+BANK+HIGH
154 PRINT:COLOR 1:PRINT:LN=0:LN=LOAN
155 PRINT "ENTER LOAN AMOUNT $";:COLOR 2:LINE INPUT "",O$
156 IF O$="" THEN 120 ELSE O=VAL(O$):IF O>HIGH THEN NOISE 0,15,3:GOTO 120
157 IF O<1 THEN NOISE 0,15,3:GOTO 120
158 PRINT:COLOR 1:PRINT "  THE BANK HAS GRANTED YOU THE MONEY"
159 BANK=BANK+O:LOAN=LN+O
160 IF RTG<1 THEN RTG=5
165 FOR P=1 TO 1000:NEXT:GOTO 120
200 CLS:VIEW SCREEN(0,0)-(319,199):LINE(0,0)-(319,98),7,B:LINE(2,2)-(317,96),7,B:LINE(2,100)-(198,199),14,B:LINE(0,102)-(200,197),14,B:LINE(204,100)-(317,199),2,B:LINE(202,102)-(319,197),2,B
201 PALETTE 2,2:PALETTE 1,9:PALETTE 3,15:PALETTE 9,1:GOSUB 205:GOTO 212
205 IF FLG<>1 THEN FLG=1 ELSE RETURN
206 LINE(3,3)-(316,30),1,BF:LINE(3,31)-(316,39),9,BF:LINE(3,40)-(316,95),2,BF
207 LINE(204,161)-(317,161),2
210 LINE(280,60)-(285,20),15,BF:LINE(278,20)-(287,50),7,BF:LINE(3,60)-(316,60),4:FOR Z=3 TO 250 STEP 25:LINE(Z,60)-(Z,40),15:NEXT:LINE(3,40)-(228,40),11:LINE(228,40)-(260,60),11
211 LINE(40,10)-(100,10),11:LINE(60,12)-(70,12),11:LINE(190,20)-(250,20),11:LINE(230,22)-(270,22),11:RETURN
212 CIRCLE(260,125),40,4,,,.5:CIRCLE(260,125),25,4,,,.5:CIRCLE(260,125),24,2,,,.5:PAINT(260,125),2:CIRCLE(260,125),41,5,,,.5:CIRCLE(260,125),42,2,,,.5:PAINT(205,159),2:LINE(240,150)-(280,155),3,BF
213 LINE(241,152)-(279,152),0:LINE(204,161)-(317,161),2:IF PLY=1 THEN PLY=0:GOTO 905
214 GOTO 500
215 S1=30:S2=17:X=260:Y=125:S3=17:S4=17:A1=1.3:A2=1.3:A3=1.3:PP=1:PS=170:GOSUB 400:GOSUB 3100
225 X1=X+S1*COS(A1):Y1=Y+S2*SIN(A1)
226 X2=X+S1*COS(A2):Y2=Y+S3*SIN(A2)
227 X3=X+S1*COS(A3):Y3=Y+S4*SIN(A3)
228 A1=A1+RND*.1:A2=A2+RND*.1:A3=A3+RND*.1:A1=A1+.02:A2=A2+.02:A3=A3+.02
230 PSET(X1Z,Y1Z),0:PSET(X1,Y1),1:X1Z=X1:Y1Z=Y1
231 PSET(X2Z,Y2Z),0:PSET(X2,Y2),2:X2Z=X2:Y2Z=Y2
232 PSET(X3Z,Y3Z),0:PSET(X3,Y3),3:X3Z=X3:Y3Z=Y3
233 IF A1>A2 AND A1>A3 THEN T1=A1 ELSE IF A2>A1 AND A2>A3 THEN T1=A2 ELSE T1=A3
234 IF T1>7.1 AND T1<7.9 THEN PP=2:PS=1940:GOSUB 245
235 IF T1>3.9 AND T1<4.1 THEN PP=1:PS=1190:GOSUB 260
236 IF T1>1 AND T1<2 THEN PP=2:PS=170
237 IF T1>8.140001 THEN GOSUB 1000
238 IF PP=2 THEN GOSUB 400
239 IF PP=1 THEN GOSUB 300
240 IF T1>8.5 THEN 1100
244 GOTO 225
245 IF FLG<>3 THEN FLG=3 ELSE NOISE 5,13,3:RETURN
246 LINE(3,3)-(316,30),1,BF:LINE(3,31)-(316,39),9,BF:LINE(3,40)-(316,95),2,BF
250 LINE(100,60)-(50,95),3:LINE(100,60)-(100,30),3:LINE(90,30)-(110,50),13,BF:FOR Z=100 TO 310 STEP 25:LINE(Z,60)-(Z,40),11:NEXT:LINE(100,40)-(316,40),14:LINE(2,60)-(316,60),14:LINE(70,60)-(100,40),14
251 LINE(20,20)-(100,20),7:LINE(40,18)-(130,18),15:LINE(60,16)-(10,16),7
255 RETURN
260 IF FLG<>2 THEN FLG=2 ELSE RETURN
261 LINE(3,3)-(316,30),1,BF:LINE(3,31)-(316,39),9,BF:LINE(3,40)-(316,95),2,BF:B=1:FOR A=1 TO 6:LINE(3,39+B)-(316,39+B),1:B=B+B/2:NEXT
265 FOR Z=3 TO 310 STEP 25:LINE(Z,60)-(Z,40),15:NEXT:LINE(3,40)-(316,40),11:LINE(3,60)-(316,60),11:LINE(200,60)-(206,40),12,BF:LINE(180,30)-(223,40),13,BF:LINE(50,10)-(80,10),11:LINE(20,8)-(55,8),15:LINE(40,12)-(90,12),15:LINE(250,20)-(290,20),11
270 LINE(230,18)-(260,18),3
275 RETURN
300 H1=(A1*290)-PS:H2=(A2*290)-PS:H3=(A3*290)-PS
301 V1=RND*15:V2=RND*15:NOISE 5,V1,1:NOISE 6,V1,1
305 IF H1>340 OR H1<-20 THEN D1=0 ELSE D1=1
306 IF H2>340 OR H2<-20 THEN D2=0 ELSE D2=1
307 IF H3>340 OR H3<-20 THEN D3=0 ELSE D3=1
308 TP=D1+D2+D3+DD1+DD2+DD3:IF TP=0 THEN RETURN
309 VIEW SCREEN(3,3)-(316,95)
310 IF DD1=1 THEN LINE(HH1,70)-(HH1+20,70),2:LINE(HH1+20,70)-(HH1+30,65),2
311 IF DD1=1 AND MM=1 THEN LINE(HH1,70)-(HH1-10,80),2:LINE(HH1+20,70)-(HH1+30,80),2 ELSE IF DD1=1 AND MM=2 THEN LINE(HH1,70)-(HH1+10,80),2:LINE(HH1+20,70)-(HH1+10,80),2
312 V1=RND*15:V2=RND*15:NOISE 4,V1,1
320 IF DD2=1 THEN LINE(HH2,70)-(HH2+20,70),2:LINE(HH2+20,70)-(HH2+30,65),2
321 IF DD2=1 AND MM=2 THEN LINE(HH2,70)-(HH2-10,80),2:LINE(HH2+20,70)-(HH2+30,80),2 ELSE IF DD2=1 AND MM=1 THEN LINE(HH2,70)-(HH2+10,80),2:LINE(HH2+20,70)-(HH2+10,80),2
322 NOISE 5,V2,1
330 IF DD3=1 THEN LINE(HH3,70)-(HH3+20,70),2:LINE(HH3+20,70)-(HH3+30,65),2
331 IF DD3=1 AND MM=1 THEN LINE(HH3,70)-(HH3-10,80),2:LINE(HH3+20,70)-(HH3+30,80),2 ELSE IF DD3=1 AND MM=2 THEN LINE(HH3,70)-(HH3+10,80),2:LINE(HH3+20,70)-(HH3+10,80),2
333 NOISE 3,V1,1
335 HH1=H1:HH2=H2:HH3=H3:DD1=D1:DD2=D2:DD3=D3:M=M+1:IF M=3 THEN M=1
336 MM=M
337 V1=RND*15:V2=RND*15
344 NOISE 6,V1,1
345 IF D1=1 THEN LINE(H1,70)-(H1+20,70),1:LINE(H1+20,70)-(H1+30,65),1
346 IF D1=1 AND M=1 THEN LINE(H1,70)-(H1-10,80),1:LINE(H1+20,70)-(H1+30,80),1 ELSE IF D1=1 AND M=2 THEN LINE(H1,70)-(H1+10,80),1:LINE(H1+20,70)-(H1+10,80),1
347 V1=RND*15:V2=RND*15
348 NOISE 4,V1,1
350 IF D2=1 THEN LINE(H2,70)-(H2+20,70),0:LINE(H2+20,70)-(H2+30,65),0
351 IF D2=1 AND M=2 THEN LINE(H2,70)-(H2-10,80),0:LINE(H2+20,70)-(H2+30,80),0 ELSE IF D2=1 AND M=1 THEN LINE(H2,70)-(H2+10,80),0:LINE(H2+20,70)-(H2+10,80),0
360 IF D3=1 THEN LINE(HH3,70)-(H3+20,70),3:LINE(H3+20,70)-(H3+30,65),3
361 IF D3=1 AND M=1 THEN LINE(H3,70)-(H3-10,80),3:LINE(H3+20,70)-(H3+30,80),3 ELSE IF D3=1 AND M=2 THEN LINE(H3,70)-(H3+10,80),3:LINE(H3+20,70)-(H3+10,80),3
362 NOISE 6,V2,1
365 VIEW SCREEN(0,0)-(319,199)
370 RETURN
400 H1=(A1*290)-PS:H2=(A2*290)-PS:H3=(A3*290)-PS
401 H1=500-H1:H2=500-H2:H3=500-H3
402 V1=RND*13:V2=RND*13:NOISE 5,V1,1
405 IF H1>340 OR H1<-20 THEN D1=0 ELSE D1=1
406 IF H2>340 OR H2<-20 THEN D2=0 ELSE D2=1
407 IF H3>340 OR H3<-20 THEN D3=0 ELSE D3=1
408 TP=D1+D2+D3+DD1+DD2+DD3:IF TP=0 THEN RETURN
409 VIEW SCREEN(3,3)-(316,95):NOISE 6,V2,2
410 IF DD1=1 THEN LINE(HH1,70)-(HH1+20,70),2:LINE(HH1,70)-(HH1-10,65),2
411 IF DD1=1 AND MM=1 THEN LINE(HH1,70)-(HH1-10,80),2:LINE(HH1+20,70)-(HH1+30,80),2 ELSE IF DD1=1 AND MM=2 THEN LINE(HH1,70)-(HH1+10,80),2:LINE(HH1+20,70)-(HH1+10,80),2
420 IF DD2=1 THEN LINE(HH2,70)-(HH2+20,70),2:LINE(HH2,70)-(HH2-10,65),2
421 IF DD2=1 AND MM=2 THEN LINE(HH2,70)-(HH2-10,80),2:LINE(HH2+20,70)-(HH2+30,80),2 ELSE IF DD2=1 AND MM=1 THEN LINE(HH2,70)-(HH2+10,80),2:LINE(HH2+20,70)-(HH2+10,80),2
425 NOISE 4,V1,2
430 IF DD3=1 THEN LINE(HH3,70)-(HH3+20,70),2:LINE(HH3,70)-(HH3-10,65),2
431 IF DD3=1 AND MM=1 THEN LINE(HH3,70)-(HH3-10,80),2:LINE(HH3+20,70)-(HH3+30,80),2 ELSE IF DD3=1 AND MM=2 THEN LINE(HH3,70)-(HH3+10,80),2:LINE(HH3+20,70)-(HH3+10,80),2
432 NOISE 6,V1,2
435 HH1=H1:HH2=H2:HH3=H3:DD1=D1:DD2=D2:DD3=D3:M=M+1:IF M=3 THEN M=1
436 MM=M
445 IF D1=1 THEN LINE(H1,70)-(H1+20,70),1:LINE(H1,70)-(H1-10,65),1
446 IF D1=1 AND M=1 THEN LINE(H1,70)-(H1-10,80),1:LINE(H1+20,70)-(H1+30,80),1 ELSE IF D1=1 AND M=2 THEN LINE(H1,70)-(H1+10,80),1:LINE(H1+20,70)-(H1+10,80),1
447 NOISE 5,V2,1
450 IF D2=1 THEN LINE(H2,70)-(H2+20,70),0:LINE(H2,70)-(H2-10,65),0
451 IF D2=1 AND M=2 THEN LINE(H2,70)-(H2-10,80),0:LINE(H2+20,70)-(H2+30,80),0 ELSE IF D2=1 AND M=1 THEN LINE(H2,70)-(H2+10,80),0:LINE(H2+20,70)-(H2+10,80),0
460 IF D3=1 THEN LINE(HH3,70)-(H3+20,70),3:LINE(H3,70)-(H3-10,65),3
461 IF D3=1 AND M=1 THEN LINE(H3,70)-(H3-10,80),3:LINE(H3+20,70)-(H3+30,80),3 ELSE IF D3=1 AND M=2 THEN LINE(H3,70)-(H3+10,80),3:LINE(H3+20,70)-(H3+10,80),3
462 NOISE 4,V1,2
465 VIEW SCREEN(0,0)-(319,199)
470 RETURN
500 REM GAME CONTROL
505 RESTORE 510
510 DATA THE HERO,EXODUS,REX RUNS,TOP HOE!,BIG JOHN,RED GIN,SHERGONE,ZILZORE,A.POST,BLUE HQ,LIGHTNING,THUNDER,RAINDOG,FLASH,FISH FACE,BONE IDOL,KWIQ WYZY,IN SALE
515 DATA RED BERRY,FLAT TIRE,HOT CAKE,MR PILLS,JAKE,ROYAL BLUE,OCEAN WAVE,JERRY Z,ZAPPO,H2O,COMPUTEXT,RENTOWIN,HARRY,SWL ON,SUPER 90,POPEAR,JASPAR
520 DATA FLAKEAWAY,FLUF!,FIX IT,ODD JOB,BULB ON,HIPPY WOW,STOOL CAT,AGOGO,LOADSA,XL+2(EX),STAR WARS,SUPER DOG,COOKIE,IVY BE,ERRDEY 1,45 POUNDS,MATSAIO,FERRIC,LOW NOISE,RUMBLE,OZONE,MR CFC,SASHIERD
525 FOR N=1 TO 58
530 READ N$(N)
535 NEXT
540 FOR A=1 TO 200
545 N1=FIX(RND*57)+1:N2=FIX(RND*57)+1
550 N=N1:N1$=N$(N):N=N2:N2$=N$(N):N$(N)=N1$:N=N1:N$(N)=N2$
555 NEXT
560 PL=-2:PL2=PL
600 PL2=PL2+3:RN=RN+1:IF LOAN>0 THEN RTG=RTG-1:IF RTG=0 AND BANK<LOAN THEN 2200 ELSE IF RTG=0 THEN BANK=BANK-LOAN:GOTO 2100
601 NR$=LEFT$(TIME$,5):IF PL2>54 THEN 500
602 IF LOAN>0 THEN LOAN=LOAN+FIX(LOAN/IN)
605 PALETTE 0,7:PALETTE 1,7:PALETTE 2,7:PALETTE 3,7:COLOR 3,0:CLS
610 LINE(319,180)-(300,199),3:LINE(319,180)-(300,180),3:LINE(300,180)-(300,199),3:PAINT(319,199),3:LINE(10,5)-(110,42),2,BF:LINE(1,45)-(318,45),3:LINE(1,47)-(318,47),3
615 COLOR 1
620 LOCATE 2,3:PRINT STRING$(3,219)
621 LOCATE 3,3:PRINT CHR$(219):LOCATE 3,5:PRINT CHR$(219)
622 LOCATE 4,3:PRINT CHR$(219)CHR$(219)
623 LOCATE 5,3:PRINT CHR$(219):LOCATE 5,5:PRINT CHR$(219)
624 LOCATE 2,7:PRINT STRING$(3,219)
625 LOCATE 3,7:PRINT CHR$(219):LOCATE 3,9:PRINT CHR$(219)
626 LOCATE 4,7:PRINT CHR$(219):LOCATE 4,9:PRINT CHR$(219)
627 LOCATE 5,7:PRINT STRING$(3,219)
628 LOCATE 2,11:PRINT CHR$(219):LOCATE 2,13:PRINT CHR$(219)
629 LOCATE 3,11:PRINT CHR$(219):LOCATE 3,13:PRINT CHR$(219)
630 LOCATE 4,11:PRINT CHR$(219):LOCATE 4,13:PRINT CHR$(219)
631 LOCATE 5,12:PRINT CHR$(219)
632 COLOR 3:LOCATE 5,18:PRINT "THE RACING JOURNAL":LOCATE 2,35:PRINT "#"RIGHT$(STR$(VER),3)
635 LOCATE 8,1:PRINT "  GRAYDOCK HOSTS ANOTHER G.H. RACE AT    "NR$" THIS WILL BE RACE"RN"OF"
640 PRINT "  THE DAY.THE LINE UP IS AS FOLLOWS:"
645 PL=PL2:N=PL:D1$=N$(N):N=N+1:D2$=N$(N):N=N+1:D3$=N$(N)
650 LOCATE 12,2:PRINT "1 : "D1$
651 LOCATE 12,17:PRINT ": BLUE  :"N-2
655 LOCATE 14,2:PRINT "2 : "D2$
656 LOCATE 14,17:PRINT ": GREEN :"N-1
660 LOCATE 16,2:PRINT "3 : "D3$
661 LOCATE 16,17:PRINT ": WHITE :"N
665 LOCATE 19,5:PRINT "THE WINNER OF LAST RACE WAS:":LOCATE 21,15:PRINT WIN$
670 LOCATE 23,20:PRINT ">>>PRESS SPACE":BACK=0:BET$="[NONE]"
671 PALETTE 1,1:PALETTE 2,4:PALETTE 3,0
675 WHILE INKEY$<>" ":WEND
680 CLS:PALETTE 0,0:PALETTE 1,0:PALETTE 2,0:PALETTE 3,0
685 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
690 COLOR 3:LOCATE 3,17:PRINT "BETTING"
691 IF BACK<>0 THEN 698
695 COLOR 2:LOCATE 6,5:PRINT "[1] - BET ON ";:COLOR 1:PRINT D1$
696 COLOR 2:LOCATE 8,5:PRINT "[2] - BET ON ";:COLOR 1:PRINT D2$
697 COLOR 2:LOCATE 10,5:PRINT "[3] - BET ON ";:COLOR 1:PRINT D3$
698 COLOR 2:LOCATE 12,5:PRINT "[4] - CHECK BETTING DETAILS"
699 LOCATE 14,5:PRINT "[5] - MAIN MENU"
700 LOCATE 16,5:PRINT "[6] - WATCH RACE"
705 COLOR 3:LOCATE 20,10:PRINT "BETTING CASH $"CASH
710 LOCATE 22,10:PRINT "CASH IN BANK $"BANK
711 PALETTE 3,8:PALETTE 1,0:PALETTE 2,0:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,4:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,12:PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,9:FOR P=1 TO 100:NEXT
715 A$=INKEY$:IF A$="" THEN SOUND RND*700,.5,5,0:SOUND RND*500,.5,5,1:SOUND RND*300,.5,5,2:GOTO 715
716 IF BACK<>0 THEN 725
717 IF A$="1" OR A$="3" OR A$="2" THEN GOSUB 845:CLS:LOCATE 1,1
720 IF A$="1" THEN BACK=1:GOTO 800
721 IF A$="2" THEN BACK=2:GOTO 815
722 IF A$="3" THEN BACK=3:GOTO 830
725 IF VAL(A$)>3 AND VAL(A$)<7 THEN GOSUB 845
726 IF A$="4" THEN 850
730 IF A$="5" THEN ZG=1:CLS:GOTO 65
735 IF A$="6" THEN 900
795 GOTO 715
800 CLS:COLOR 3:PRINT:PRINT:PRINT " BET ON "D1$:COLOR 2:PRINT:PRINT:PRINT " YOU HAVE $"CASH:COLOR 1:PRINT:PRINT:PRINT " HOW MUCH TO BET $";:COLOR 3
801 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
802 PALETTE 3,8:PALETTE 1,0:PALETTE 2,0:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,4:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,12:PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,9:FOR P=1 TO 100:NEXT
804 LINE INPUT "",B$
805 IF B$="" THEN BACK=0:GOTO 680
810 BET=VAL(B$):IF BET>CASH THEN PRINT " YOU DONT HAVE THAT MUCH":FOR P=1 TO 900:NEXT:BACK=0:GOTO 680
811 IF BET<1 THEN BACK=0:GOTO 680
812 CASH=CASH-BET:PRINT " YOUR BET HAS BEEN PLACED.":FOR P=1 TO 900:NEXT:BET$=D1$:GOTO 680
815 CLS:COLOR 3:PRINT:PRINT:PRINT " BET ON "D2$:COLOR 2:PRINT:PRINT:PRINT " YOU HAVE $"CASH:COLOR 1:PRINT:PRINT:PRINT " HOW MUCH TO BET $";:COLOR 3
816 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
817 PALETTE 3,8:PALETTE 1,0:PALETTE 2,0:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,4:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,12:PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,9:FOR P=1 TO 100:NEXT
819 LINE INPUT "",B$
820 IF B$="" THEN BACK=0:GOTO 680
825 BET=VAL(B$):IF BET>CASH THEN PRINT " YOU DONT HAVE THAT MUCH":FOR P=1 TO 900:NEXT:BACK=0:GOTO 680
826 IF BET<1 THEN BACK=0:GOTO 680
827 CASH=CASH-BET:PRINT " YOUR BET HAS BEEN PLACED.":FOR P=1 TO 900:NEXT:BET$=D2$:GOTO 680
830 CLS:COLOR 3:PRINT:PRINT:PRINT " BET ON "D3$:COLOR 2:PRINT:PRINT:PRINT " YOU HAVE $"CASH:COLOR 1:PRINT:PRINT:PRINT " HOW MUCH TO BET $";:COLOR 3
831 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
832 PALETTE 3,8:PALETTE 1,0:PALETTE 2,0:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,4:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,12:PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,9:FOR P=1 TO 100:NEXT
834 LINE INPUT "",B$
835 IF B$="" THEN BACK=0:GOTO 680
836 BET=VAL(B$):IF BET>CASH THEN PRINT " YOU DONT HAVE THAT MUCH":FOR P=1 TO 900:NEXT:BACK=0:GOTO 680
837 IF BET<1 THEN BACK=0:GOTO 680
838 CASH=CASH-BET:PRINT " YOUR BET HAS BEEN PLACED.":FOR P=1 TO 900:NEXT:BET$=D3$:GOTO 680
845 PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,0:PALETTE 2,4:PALETTE 3,7:FOR P=1 TO 100:NEXT:PALETTE 2,0:PALETTE 3,8:FOR P=1 TO 100:NEXT:PALETTE 3,0:CLS
846 RETURN
850 CLS
851 PALETTE 1,0:PALETTE 2,0:PALETTE 3,0
860 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
865 COLOR 3:LOCATE 2,13:PRINT "BETTING DETAILS":LINE(96,16)-(215,16),3
870 COLOR 2:LOCATE 10,5:PRINT "BET $";:COLOR 3:PRINT BET
875 COLOR 2:LOCATE 12,5:PRINT "DOG BETTED ON:";:COLOR 3:PRINT BET$
880 COLOR 2:LOCATE 14,5:PRINT "RETURN $";:COLOR 3:PRINT FIX(BET+(BET/2))
885 COLOR 2:LOCATE 16,5:PRINT "DOG NUMBER :";:COLOR 3:PRINT BACK
886 IF BACK=1 THEN COL$="BLUE" ELSE IF BACK=2 THEN COL$="GREEN" ELSE COL$="WHITE"
890 COLOR 2:LOCATE 18,5:PRINT "DOG COLOUR :";:COLOR 3:PRINT COL$
894 COLOR 1:LOCATE 22,20:PRINT ">>>PRESS SPACE"
895 PALETTE 3,8:PALETTE 1,0:PALETTE 2,0:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,4:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,12:PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,9:FOR P=1 TO 100:NEXT
896 WHILE INKEY$<>" ":WEND
897 PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,0:PALETTE 2,4:PALETTE 3,7:FOR P=1 TO 100:NEXT:PALETTE 2,0:PALETTE 3,8:FOR P=1 TO 100:NEXT:PALETTE 3,0:CLS
898 GOTO 680
900 FLG=0:PLY=1:WIN=0:GOTO 200
905 REM PRINT ON MAIN SCREEN
910 COLOR 3
915 LOCATE 14,7:PRINT "* BETTING *"
920 LOCATE 17,2:PRINT "CASH ";:COLOR 2:PRINT CASH
921 COLOR 3:LOCATE 18,2:PRINT "BET  ";:COLOR 2:PRINT BET"   "
922 COLOR 3:LOCATE 20,2:PRINT "WON  ";:COLOR 2:PRINT WON
923 COLOR 3:LOCATE 21,2:PRINT "LOST ";:COLOR 2:PRINT LOST
924 COLOR 3:LOCATE 17,7:PRINT "$":LOCATE 18,7:PRINT "$":LOCATE 20,7:PRINT "$":LOCATE 21,7:PRINT "$"
925 COLOR 3:LOCATE 24,2:PRINT "DOG BET ON:";:COLOR 1:PRINT BET$:IF GF=1 THEN GF=0:GOTO 1120
930 COLOR 3:LOCATE 17,14:PRINT "BANK ";:COLOR 2:PRINT BANK
935 COLOR 3:LOCATE 18,14:PRINT "LOAN ";:COLOR 2:PRINT LOAN
940 LOCATE 20,14:PRINT "RTG  ";:COLOR 1:PRINT RTG
945 COLOR 2:LOCATE 21,14:PRINT "RACE ";:COLOR 1:PRINT RN
950 COLOR 3:LOCATE 17,19:PRINT "$":LOCATE 18,19:PRINT "$":COLOR 2:LOCATE 20,19:PRINT ":":LOCATE 21,19:PRINT ":"
955 COLOR 3:LOCATE 22,27:PRINT "1";:COLOR 1:PRINT CHR$(219);D1$
960 COLOR 3:LOCATE 23,27:PRINT "2";:COLOR 2:PRINT CHR$(219);D2$
965 COLOR 3:LOCATE 24,27:PRINT "3";:COLOR 3:PRINT CHR$(219);D3$
970 GOTO 215
1000 NOISE 6,15,4:IF WIN<>0 THEN RETURN
1005 IF A1>A2 AND A1>A3 THEN WIN=1
1010 IF A2>A1 AND A2>A3 THEN WIN=2
1015 IF A3>A1 AND A3>A2 THEN WIN=3
1020 RETURN
1100 IF WIN=1 THEN WIN$=D1$ ELSE IF WIN=2 THEN WIN$=D2$ ELSE WIN$=D3$
1105 IF BACK=WIN THEN WON=WON+BET:CASH=CASH+BET+FIX(BET/2):PWIN=1:BET=0
1110 IF BACK<>WIN THEN LOST=LOST+BET:BET=0:PWIN=0
1115 GF=1:GOTO 910
1116 NOISE 5,15,10
1120 MES$="WINNER:"+WIN$:X1=20-(LEN(MES$)/2):LOCATE 5,X1:COLOR 3:PRINT MES$
1121 PLAY "MB":IF PWIN=1 THEN FOR Z=1 TO 3:FOR A=9 TO 230 STEP 23:SOUND A*4,.3,15,0:SOUND A,.2,15,1:SOUND A*2*3,.1,15,2:NEXT:NEXT:FOR A=-120 TO 3000 STEP 80:SOUND A,.1,15,0:SOUND A*3,.1,15,1:SOUND A*8,.1,15,2:PALETTE RND*3,RND*3:NEXT
1122 IF PWIN=0 THEN FOR Z=1 TO 3:FOR V=15 TO 0 STEP -2:NOISE 4,V,1:NEXT:NEXT:FOR A=900 TO 100 STEP -50:SOUND A,1,15,0:SOUND A*4,1,15,1:NEXT
1123 PALETTE 1,9:PALETTE 2,2:PALETTE 3,15
1130 MES$="PRESS SPACE":X1=20-(LEN(MES$)/2):LOCATE 7,X1:PRINT MES$
1131 FOR V=1 TO 15:NOISE 6,V,2:NEXT
1135 WHILE INKEY$<>" ":NOISE 6,15,1:WEND
1140 IF CASH<1 THEN PALETTE 0,0:GOTO 2000
1145 S=1:FOR Z=1 TO 18:LINE(160-S,100-S)-(160+S,100+S),0,BF:S=S+S/2:NEXT
1150 GOTO 600
2000 CLS:PALETTE 1,0:PALETTE 2,0:PALETTE 3,0
2005 CLS
2010 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
2015 COLOR 3:LOCATE 3,10:PRINT "YOU HAVE NO CASH LEFT"
2020 COLOR 2:LOCATE 8,5:PRINT "YOU HAVE NO CASH IN YOUR POCKET"
2025 LOCATE 9,7:PRINT "YOU CAN NOT BET AGAIN TODAY"
2030 COLOR 1:LOCATE 15,10:PRINT "YOU LASTED"RN"RACES."
2035 COLOR 3:LOCATE 24,20:PRINT ">>>PRESS SPACE"
2036 PALETTE 3,8:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,2:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,10:PALETTE 1,4:FOR P=1 TO 100:NEXT:PALETTE 1,12
2037 PLAY "MB":FOR A=900 TO 500 STEP -10:SOUND A,.5,15,0:SOUND A+5,.5,15,1:SOUND A+15,.5,15,2:NEXT:NOISE 6,15,5:FOR V=15 TO 5 STEP -.51:NOISE 5,V,1:NEXT
2040 WHILE INKEY$<>" ":WEND
2045 RUN
2100 CLS:PALETTE 1,0:PALETTE 2,0:PALETTE 3,0:PALETTE 0,0
2105 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
2110 COLOR 3:LOCATE 3,10:PRINT "MESSAGE FROM THE BANK"
2115 COLOR 2:LOCATE 10,5:PRINT "WE HAVE REDUCED YOUR ACCOUNT BY"
2120 LOCATE 11,5:PRINT "WHAT WAS OUTSTANDING WITH YOUR LOAN"
2125 LOCATE 12,5:PRINT "WITH US.Ie: $";:COLOR 3:PRINT LOAN
2126 LOCATE 18,10:PRINT "BANK $"BANK
2130 LOCATE 24,20:PRINT ">>>PRESS SPACE"
2133 PALETTE 3,8:PALETTE 1,0:PALETTE 2,0:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,4:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,12:PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,9:FOR P=1 TO 100:NEXT
2134 PLAY "MB":SOUND 311,4,14,0:SOUND 622,4,14,1:SOUND 311,8,15,0:SOUND 622,8,15,1:FOR V=15 TO 0 STEP -.5:SOUND 349,1,V,0:SOUND 698,1,V,1:NEXT
2135 WHILE INKEY$<>" ":WEND
2139 PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,0:PALETTE 2,4:PALETTE 3,7:FOR P=1 TO 100:NEXT:PALETTE 2,0:PALETTE 3,8:FOR P=1 TO 100:NEXT:PALETTE 3,0:CLS
2140 GOTO 601
2200 CLS:PALETTE 1,0:PALETTE 2,0:PALETTE 3,0:PALETTE 0,0
2205 LINE(0,0)-(319,199),1,B:LINE(2,2)-(317,197),1,B
2210 COLOR 3:LOCATE 3,10:PRINT "MESSAGE FROM THE BANK"
2215 COLOR 2:LOCATE 10,3:PRINT "YOUR ACCOUNT DOES NOT HOLD ENOUGH"
2220 LOCATE 11,3:PRINT "MONEY TO PAY BACK YOUR LOAN THERE"
2225 LOCATE 12,3:PRINT "FORE WE ARE FREZZING ALL ASSETS IN"
2230 LOCATE 13,3:PRINT "YOUR NAME."
2235 COLOR 3:BANK=0:CASH=0:LOCATE 16,15:PRINT "TOTAL CASH $"CASH+BANK
2240 LOCATE 24,20:PRINT ">>>PRESS SPACE"
2245 PALETTE 3,8:PALETTE 1,0:PALETTE 2,0:FOR P=1 TO 100:NEXT:PALETTE 3,7:PALETTE 2,4:FOR P=1 TO 100:NEXT:PALETTE 3,15:PALETTE 2,12:PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,9:FOR P=1 TO 100:NEXT
2246 PLAY "MB":FOR V=15 TO 0 STEP -.5:SOUND RND*3000,.5,V,0:SOUND RND*3000,.5,V,1:SOUND RND*3000,.5,V,2:NEXT
2250 WHILE INKEY$<>" ":WEND
2255 PALETTE 1,1:FOR P=1 TO 100:NEXT:PALETTE 1,0:PALETTE 2,4:PALETTE 3,7:FOR P=1 TO 100:NEXT:PALETTE 2,0:PALETTE 3,8:FOR P=1 TO 100:NEXT:PALETTE 3,0:CLS
2260 GOTO 2000
3000 REM TUNE DATA
3005 DATA 175,349,698
3010 DATA 175,349,698
3015 DATA 220,440,880
3020 DATA 262,523,1047
3025 DATA 262,523,1047
3030 DATA 220,440,880
3035 DATA 220,440,880
3040 DATA 175,349,698
3045 DATA 220,440,880
3050 DATA 175,349,698
3055 DATA 131,262,523
3060 DATA 131,262,523
3065 DATA 175,349,698
3070 DATA 175,349,698
3075 DATA 220,440,880
3080 DATA 262,523,1047
3085 DATA 262,523,1047
3090 DATA 131,262,523
3091 DATA 131,262,523
3095 DATA 175,349,698
3096 DATA 175,349,698
3097 DATA 175,349,698
3100 REM TUNE
3105 RESTORE 3000:FOR V=10 TO 15:NOISE 4,V,1:NEXT:FOR V=15 TO 8 STEP -.1:NOISE 4,V,1:NEXT
3106 FOR P=1 TO 1000:NEXT
3110 SOUND ON:PLAY "MB"
3111 V=15:D=.86:P=2
3115 FOR Z=1 TO 22
3120 READ A,B,C
3125 SOUND A,D,V-1,0:SOUND B,D,V-1,1:SOUND C,D,V-2,2:SOUND A-P,D,V,0:SOUND B+P,D,V,1:SOUND C-P,D,V,2:SOUND A+P,D,V,0:SOUND B-P,D,V,1:SOUND C+P,D,V-1,2
3130 NEXT
3135 D=.5:FOR V=14 TO 0 STEP -1
3140 SOUND A,D,V,0:SOUND B,D,V,1:SOUND C,D,V,2:SOUND A-P,D,V,0:SOUND B+P,D,V,1:SOUND C-P,D,V,2:SOUND A+P,D,V,0:SOUND B-P,D,V,1:SOUND C+P,D,V,2
3145 NEXT
3149 NOISE 6,9,25:FOR P=1 TO 1000:NEXT
3150 NOISE 6,7,50
3155 FOR P=1 TO 100:NEXT
3160 D=13:PLAY "MB"
3165 SOUND 262,D,15,0:SOUND 523,D,15,1
3170 FOR P=1 TO 1300:NEXT
3175 SOUND 262,D,15,0:SOUND 523,D,15,1
3180 FOR P=1 TO 1300:NEXT
3190 D=2:FOR V=15 TO 0 STEP -1
3195 SOUND 523,D,V,0:SOUND 1047,D,V,1
3196 NEXT
3197 RETURN
